\begin{proof}[\textbf{Solution~\ref{ex:block_ciphers:disadvantages_of_mode}}]
Electronic codebook mode -- it leaves the cipher most open to 
analysis of its statistical properties, so that we can demonstrate 
the methods to crack it.  It is also the most natural and na\"ive 
way to apply a block cipher.
\end{proof}

\begin{proof}[\textbf{Solution~\ref{ex:block_ciphers:encipher_with_ECB_CBC_CFB}}] 
The ciphertext output for each of ECB, CBC, and CFB modes is: 
\begin{center}
\begin{tabular}[t]{ll}
ECB mode: & {\tt 11001010001111111100000000001111}\\
CBC mode: & {\tt 00001010000011111100111100001111}\\
CFB mode: & {\tt 00000111010000111110001011010001}
\end{tabular}
\end{center}
Here the leading initialization vector $1001$ is omitted in the CBC output.  
%These calculations are achieved with the code on the subsequent page.
\end{proof}

\begin{proof}[\textbf{Solution~\ref{ex:block_ciphers:steps_required_error_recovery}}] 
The blocks in ECB mode are independent, so error recovery is immediate,
i.e. an error affects only the block in which it occurs.  In CBC mode 
recovery from erros occurs after two blocks. 
\end{proof}

\begin{proof}[\textbf{Solution~\ref{ex:block_ciphers:steps_in_CFB_to_recover_error}}] 
Recovery in CFB mode occurs after $[n/r] = 64/8 = 8$ blocks.  
In OFB mode recovery is immediate, provided synchronization is not lost.

%\input{code/solution06.3.m}
%\input{code/solution06.3.sage}
\end{proof}
